#analysis - stacked
#alan yan
#2-9-22

####setup####
#clear environment
rm(list = ls())

#load packages
pacman::p_load(tidyverse,
               DeclareDesign,
               stargazer,
               hrbrthemes)

#load data
dt <- read_rds("02-framing-experiment/data/clean-data-stacked-pol")

#### **standardized** ####
#### ***support ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = support.standardized ~ treatment + policy ) -> lm.stacked.workplace.support.standardized

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = support.standardized ~ treatment) -> lm.codeterm.support.standardized

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = support.standardized ~ treatment) -> lm.elections.support.standardized

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = support.standardized ~ treatment) -> lm.esops.support.standardized

#### *** work ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = work.standardized ~ treatment + policy) -> lm.stacked.workplace.work.standardized

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = work.standardized ~ treatment) -> lm.codeterm.work.standardized

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = work.standardized ~ treatment) -> lm.elections.work.standardized

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = work.standardized ~ treatment) -> lm.esops.work.standardized

#### *** power ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = power.standardized ~ treatment + policy) -> lm.stacked.workplace.power.standardized

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = power.standardized ~ treatment) -> lm.codeterm.power.standardized

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = power.standardized ~ treatment) -> lm.elections.power.standardized

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = power.standardized ~ treatment) -> lm.esops.power.standardized

#### *** resp ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = resp.standardized ~ treatment + policy ) -> lm.stacked.workplace.resp.standardized

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = resp.standardized ~ treatment) -> lm.codeterm.resp.standardized

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = resp.standardized ~ treatment) -> lm.elections.resp.standardized

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = resp.standardized ~ treatment) -> lm.esops.resp.standardized

#### ***support - enviro and parental ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro",
                  "parent")
  ) %>%
  lm(formula = support.standardized ~ treatment + policy ) -> lm.stacked.non_workplace.support.standardized

#### environmental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(formula = support.standardized ~ treatment) -> lm.enviro.support.standardized

#### parental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("parent") 
  ) %>%
  lm(formula = support.standardized ~ treatment) -> lm.parent.support.standardized

#### ***benefit - enviro and parental ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro",
                  "parent")
  ) %>%
  lm(formula = ben.standardized ~ treatment + policy ) -> lm.stacked.non_workplace.ben.standardized

#### environmental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(formula = ben.standardized ~ treatment) -> lm.enviro.ben.standardized

#### parental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("parent") 
  ) %>%
  lm(formula = ben.standardized ~ treatment) -> lm.parent.ben.standardized

#### ***cost - enviro and parental ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro",
                  "parent")
  ) %>%
  lm(formula = cost.standardized ~ treatment + policy ) -> lm.stacked.non_workplace.cost.standardized

#### environmental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(formula = cost.standardized ~ treatment) -> lm.enviro.cost.standardized

#### parental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("parent") 
  ) %>%
  lm(formula = cost.standardized ~ treatment) -> lm.parent.cost.standardized

#### testing differences between workplace democracy proposals and non workplace democracy proposals ####
#### support ####
dt %>%
  lm(formula = support.standardized ~ treatment*workplace_democracy_policy +
       treatment*political_party.centered +
       treatment*r_ideology.centered) -> lm.stacked.workplace_vs_nonworkplace.support.standardized

#### work ####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops",
                  "parent")
  ) %>%
  lm(formula = work.standardized ~ treatment*workplace_democracy_policy +
     treatment*political_party.centered +
       treatment*r_ideology.centered) -> lm.stacked.workplace_vs_nonworkplace.work.standardized

#### testing potential moderators ####
#### support ####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = support.standardized ~ treatment*democracy.index.centered +
       treatment*wright.index.centered +
       treatment*class.id.index.centered +
       treatment*sdo.index.centered +
       treatment*political_party.centered +
       treatment*r_ideology.centered +
       policy) -> lm.stacked.workplace.support.heterogeneity

#### work ####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = work.standardized ~ treatment*democracy.index.centered +
              treatment*wright.index.centered +
              treatment*class.id.index.centered +
              treatment*sdo.index.centered +
       treatment*political_party.centered +
       treatment*r_ideology.centered +
              policy) -> lm.stacked.workplace.work.heterogeneity

####working class only ####
#### support ####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops") &
      r_class == "Working class"
  ) %>%
  lm(formula = support.standardized ~ treatment*democracy.index.centered +
              treatment*wright.index.centered +
              treatment*class.id.index.centered +
              treatment*sdo.index.centered +
       treatment*political_party.centered +
       treatment*r_ideology.centered +
              policy) -> lm.stacked.workplace.support.heterogeneity.working_class

#### work ####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops") &
      r_class == "Working class"
  ) %>%
  lm(formula = work.standardized ~ treatment*democracy.index.centered +
              treatment*wright.index.centered +
              treatment*class.id.index.centered +
              treatment*sdo.index.centered +
       treatment*political_party.centered +
       treatment*r_ideology.centered +
              policy) -> lm.stacked.workplace.work.heterogeneity.working_class


#### **unstandardized** ####
#### ***support ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = support ~ treatment + policy ) -> lm.stacked.workplace.support

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = support ~ treatment) -> lm.codeterm.support

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = support ~ treatment) -> lm.elections.support

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = support ~ treatment) -> lm.esops.support

#### *** work ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = work ~ treatment + policy) -> lm.stacked.workplace.work

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = work ~ treatment) -> lm.codeterm.work

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = work ~ treatment) -> lm.elections.work

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = work ~ treatment) -> lm.esops.work

#### *** power ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = power ~ treatment + policy) -> lm.stacked.workplace.power

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = power ~ treatment) -> lm.codeterm.power

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = power ~ treatment) -> lm.elections.power

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = power ~ treatment) -> lm.esops.power

#### *** resp ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm",
                  "elections",
                  "esops")
  ) %>%
  lm(formula = resp ~ treatment + policy ) -> lm.stacked.workplace.resp

#### codetermination - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(formula = resp ~ treatment) -> lm.codeterm.resp

#### elections - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("elections") 
  ) %>%
  lm(formula = resp ~ treatment) -> lm.elections.resp

#### esops - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("esops") 
  ) %>%
  lm(formula = resp ~ treatment) -> lm.esops.resp

#### ***support - enviro and parental ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro",
                  "parent")
  ) %>%
  lm(formula = support ~ treatment + policy ) -> lm.stacked.non_workplace.support

#### environmental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(formula = support ~ treatment) -> lm.enviro.support

#### parental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("parent") 
  ) %>%
  lm(formula = support ~ treatment) -> lm.parent.support

#### ***benefit - enviro and parental ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro",
                  "parent")
  ) %>%
  lm(formula = ben ~ treatment + policy ) -> lm.stacked.non_workplace.ben

#### environmental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(formula = ben ~ treatment) -> lm.enviro.ben

#### parental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("parent") 
  ) %>%
  lm(formula = ben ~ treatment) -> lm.parent.ben

#### ***cost - enviro and parental ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro",
                  "parent")
  ) %>%
  lm(formula = cost ~ treatment + policy ) -> lm.stacked.non_workplace.cost

#### environmental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(formula = cost ~ treatment) -> lm.enviro.cost

#### parental - main effect ####
#### Difference in means estimator #####
dt %>%
  filter(
    policy %in% c("parent") 
  ) %>%
  lm(formula = cost ~ treatment) -> lm.parent.cost

#### **tables - unstandardized** TABLE S174 - S177####
#### workplace - support ####
stargazer(
  lm.stacked.workplace.support,
  lm.codeterm.support,
  lm.elections.support,
  lm.esops.support
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Support"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.support, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.support, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.support, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.support, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.", 
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
)

#### workplace - work ####
stargazer(
  lm.stacked.workplace.work,
  lm.codeterm.work,
  lm.elections.work,
  lm.esops.work
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Work"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.work, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.work, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.work, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.work, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.", 
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
  )

#### workplace - power ####
stargazer(
  lm.stacked.workplace.power,
  lm.codeterm.power,
  lm.elections.power,
  lm.esops.power
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Power"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.power, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.power, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.power, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.power, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.", 
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
  )

#### workplace - resp ####
stargazer(
  lm.stacked.workplace.resp,
  lm.codeterm.resp,
  lm.elections.resp,
  lm.esops.resp
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Responsibility"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.resp, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.resp, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.resp, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.resp, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.", 
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
  )

#### **tables - standardized** Table S161 to S164####
#### workplace - support ####
stargazer(
  lm.stacked.workplace.support.standardized,
  lm.codeterm.support.standardized,
  lm.elections.support.standardized,
  lm.esops.support.standardized
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Support"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.support.standardized, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.support.standardized, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.support.standardized, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.support.standardized, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
)

#### workplace - work ####
stargazer(
  lm.stacked.workplace.work.standardized,
  lm.codeterm.work.standardized,
  lm.elections.work.standardized,
  lm.esops.work.standardized
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Work"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.work.standardized, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.work.standardized, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.work.standardized, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.work.standardized, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
  )

#### workplace - power ####
stargazer(
  lm.stacked.workplace.power.standardized,
  lm.codeterm.power.standardized,
  lm.elections.power.standardized,
  lm.esops.power.standardized
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Work"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.power.standardized, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.power.standardized, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.power.standardized, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.power.standardized, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
  )

#### workplace - resp ####
stargazer(
  lm.stacked.workplace.resp.standardized,
  lm.codeterm.resp.standardized,
  lm.elections.resp.standardized,
  lm.esops.resp.standardized
  ,
  omit = c(
    "policy",
    "r_occupation",
    "r_union",
    "r_class",
    "r_ideology",
    "age",
    "woman",
    "hhi",
    "ethnicity",
    "hispanic",
    "education",
    "political_party",
    "region",
    "sdo.index",
    "democracy.index",
    "race_resen.index",
    "class.id.index",
    "wright.index"
  ),
  covariate.labels = c("Benefit",
                       "Cost",
                       "Cost and benefit"),
  dep.var.labels = c("Responsibility"),
  column.labels = c("Workplace policies",
                    "Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace.resp.standardized, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.codeterm.resp.standardized, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.elections.resp.standardized, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.esops.resp.standardized, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
  )

#### support and work - comparison Table S4 ####
stargazer(
  lm.stacked.workplace_vs_nonworkplace.support.standardized,
  lm.stacked.workplace_vs_nonworkplace.work.standardized
  ,
  covariate.labels = c("Benefit",
                       "Cost",
                       "Both",
                       "Workplace policy",
                       "Partisan ID (Republican)",
                       "Ideology (Conservative)",
                       "Benefit X Workplace policy",
                       "Cost X Workplace policy",
                       "Both X Workplace policy",
                       "Benefit X Partisan ID", 
                       "Cost X Partisan ID", 
                       "Both X Partisan ID",
                       "Benefit X Ideology", 
                       "Cost X Ideology", 
                       "Both X Ideology"),
  dep.var.labels = c("Support", "Work"),
  column.labels = c("All policies",
                    "All policies"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.stacked.workplace_vs_nonworkplace.support.standardized, clusters = dt$rid[dt$workplace_democracy_policy %in% c(0, 1)])[[1]],
    starprep(lm.stacked.workplace_vs_nonworkplace.work.standardized, clusters = dt$rid[dt$policy %in% c("codeterm",
                                                                                                        "elections",
                                                                                                        "esops",
                                                                                                        "parent")])[[1]]
  ),
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.", 
            "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.", 
            "The workplace policy variable is 1 when the policy is related to workplace democracy and 0 otherwise.", 
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
)

#### heterogeneity - all respondents Table S5 ####
stargazer(
  lm.stacked.workplace.support.heterogeneity,
  lm.stacked.workplace.work.heterogeneity
  ,
  covariate.labels = c("Benefit",
                       "Cost",
                       "Both",
                       "Support for democracy",
                       "Position in workplace",
                       "Class ID strength",
                       "Social dominance orientation",
                       "Partisan ID (Republican)",
                       "Ideology (Conservative)",
                       "Benefit X Support for democracy",
                       "Cost X Support for democracy",
                       "Both X Support for democracy",
                       "Benefit X Position in workplace",
                       "Cost X Position in workplace",
                       "Both X Position in workplace",
                       "Benefit X Class ID strength",
                       "Cost X Class ID strength",
                       "Both X Class ID strength",
                       "Benefit X Social dominance orientation",
                       "Cost X Social dominance orientation",
                       "Both X Social dominance orientation",
                       "Benefit X Partisan ID",
                       "Cost X Partisan ID",
                       "Both X Partisan ID",
                       "Benefit X Ideology",
                       "Cost X Ideology",
                       "Both X Ideology"),
  omit = c("policy"),
  dep.var.labels = c("Support", "Work"),
  column.labels = c("Workplace democracy policies"),
  model.numbers = FALSE,
  se = starprep(lm.stacked.workplace.support.heterogeneity,
                lm.stacked.workplace.work.heterogeneity,
                clusters = dt$rid[dt$workplace_democracy_policy == 1]
                ),
  omit.stat = c("f", "ser"),
  single.row = TRUE,
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022.")
)

#### heterogeneity - working class respondents Table S6 ####
stargazer(
  lm.stacked.workplace.support.heterogeneity.working_class,
  lm.stacked.workplace.work.heterogeneity.working_class
  ,
  covariate.labels = c("Benefit",
                       "Cost",
                       "Both",
                       "Support for democracy",
                       "Position in workplace",
                       "Class ID strength",
                       "Social dominance orientation",
                       "Partisan ID (Republican)",
                       "Ideology (Conservative)",
                       "Benefit X Support for democracy",
                       "Cost X Support for democracy",
                       "Both X Support for democracy",
                       "Benefit X Position in workplace",
                       "Cost X Position in workplace",
                       "Both X Position in workplace",
                       "Benefit X Class ID strength",
                       "Cost X Class ID strength",
                       "Both X Class ID strength",
                       "Benefit X Social dominance orientation",
                       "Cost X Social dominance orientation",
                       "Both X Social dominance orientation",
                       "Benefit X Partisan ID",
                       "Cost X Partisan ID",
                       "Both X Partisan ID",
                       "Benefit X Ideology",
                       "Cost X Ideology",
                       "Both X Ideology"),
  omit = c("policy"),
  dep.var.labels = c("Support", "Work"),
  column.labels = c("Workplace policies",
                    "Workplace policies"),
  model.numbers = FALSE,
  se = starprep(lm.stacked.workplace.support.heterogeneity.working_class, 
                lm.stacked.workplace.work.heterogeneity.working_class,
                clusters = dt$rid[dt$r_class == "Working class" & dt$workplace_democracy_policy == 1]
                ), 
  omit.stat = c("f", "ser"),
  single.row = TRUE,
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
    "We inclue policy-level fixed effects, but do not show them to preserve space.",
    "We mean-centered and divided by the standard deviation at the policy level for each outcome variable.",
    "We fielded the survey on Lucid from January 19th to February 11th, 2022.",
    "Working class respondents only in these models.")
  )

#### ***acquiescence bias - correlations Tables S166 to S169####
#### workplace democracy ####
dt %>%
  filter(
    policy %in% c("codeterm")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 + 
       sdo.index + wright.index + hhi + education, .) -> lm.acquiescence.codeterm

dt %>%
  filter(
    policy %in% c(
                  "elections")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 +  + 
       sdo.index + wright.index + hhi + education, .) -> lm.acquiescence.elections

dt %>%
  filter(
    policy %in% c(
                  "esops")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 +
       sdo.index + wright.index + hhi + education , .) -> lm.acquiescence.esops

dt %>%
  filter(
    policy %in% c(
      "codeterm",
      "elections",
      "esops")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 +
       sdo.index + wright.index + hhi + education + policy, .) -> lm.acquiescence.stacked

dt %>%
  filter(
    policy %in% c(
      "codeterm",
      "elections",
      "esops")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.index +
       sdo.index + wright.index + hhi + education + policy, .) -> lm.acquiescence.stacked.indexed

stargazer(
  lm.acquiescence.stacked.indexed,
  lm.acquiescence.stacked,
  omit = c("policy"),
  covariate.labels = c("Ideology (Conservative)",
                       "Party ID (Republican)",
                       "Support political democracy (index)",
                       "Oppose a strong leader ignoring Congress and elections",
                       "Oppose experts, not elected officials, making decisions",
                       "Oppose having the army rule",
                       "Support electing representatives",
                       "Support having a democratic political system",
                       "Social dominance orientation",
                       "Place in workplace hierarchy",
                       "Household income",
                       "Education"),
  dep.var.labels = c("Support"),
  column.labels = c("Workplace democracy policies"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.acquiescence.stacked.indexed, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]],
    starprep(lm.acquiescence.stacked, clusters = dt$rid[dt$workplace_democracy_policy == 1])[[1]]
  ), 
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022."))

stargazer(
  lm.acquiescence.codeterm,
  lm.acquiescence.elections,
  lm.acquiescence.esops,
  omit = c("policy"),
  covariate.labels = c("Ideology (Conservative)",
                       "Party ID (Republican)",
                       "Oppose a strong leader ignoring Congress and elections",
                       "Oppose experts, not elected officials, making decisions",
                       "Oppose having the army rule",
                       "Support electing representatives",
                       "Support having a democratic political system",
                       "Social dominance orientation",
                       "Place in workplace hierarchy",
                       "Household income",
                       "Education"),
  dep.var.labels = c("Support"),
  column.labels = c("Codetermination",
                    "Elections",
                    "ESOPs"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.acquiescence.codeterm, clusters = dt$rid[dt$policy == "codeterm"])[[1]],
    starprep(lm.acquiescence.elections, clusters = dt$rid[dt$policy == "elections"])[[1]],
    starprep(lm.acquiescence.esops, clusters = dt$rid[dt$policy == "esops"])[[1]]
  ), 
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022."))

#### benchmark policies ####
dt %>%
  filter(
    policy %in% c("enviro")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 + 
       sdo.index + wright.index + hhi + education, .) -> lm.acquiescence.enviro

dt %>%
  filter(
    policy %in% c(
      "parent")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 +  + 
       sdo.index + wright.index + hhi + education, .) -> lm.acquiescence.parent

dt %>%
  filter(
    policy %in% c(
      "enviro",
      "parent")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.1 + democracy.2 + democracy.3 + democracy.4 + democracy.5 +
       sdo.index + wright.index + hhi + education + policy, .) -> lm.acquiescence.stacked

dt %>%
  filter(
    policy %in% c(
      "enviro",
      "parent")
  ) %>%
  lm(support ~ r_ideology + political_party + 
       democracy.index +
       sdo.index + wright.index + hhi + education + policy, .) -> lm.acquiescence.stacked.indexed

stargazer(
  lm.acquiescence.stacked.indexed,
  lm.acquiescence.stacked,
  omit = c("policy"),
  covariate.labels = c("Ideology (Conservative)",
                       "Party ID (Republican)",
                       "Support political democracy (index)",
                       "Oppose a strong leader ignoring Congress and elections",
                       "Oppose experts, not elected officials, making decisions",
                       "Oppose having the army rule",
                       "Support electing representatives",
                       "Support having a democratic political system",
                       "Social dominance orientation",
                       "Place in workplace hierarchy",
                       "Household income",
                       "Education"),
  dep.var.labels = c("Support"),
  column.labels = c("Benchmark policies",
                    "Benchmark policies"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.acquiescence.stacked.indexed, clusters = dt$rid[dt$workplace_democracy_policy == 0])[[1]],
    starprep(lm.acquiescence.stacked, clusters = dt$rid[dt$workplace_democracy_policy == 0])[[1]]
  ), 
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We inclue policy-level fixed effects, but do not show them to preserve space.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022."))

stargazer(
  lm.acquiescence.enviro,
  lm.acquiescence.parent,
  omit = c("policy"),
  covariate.labels = c("Ideology (Conservative)",
                       "Party ID (Republican)",
                       "Oppose a strong leader ignoring Congress and elections",
                       "Oppose experts, not elected officials, making decisions",
                       "Oppose having the army rule",
                       "Support electing representatives",
                       "Support having a democratic political system",
                       "Social dominance orientation",
                       "Place in workplace hierarchy",
                       "Household income",
                       "Education"),
  dep.var.labels = c("Support"),
  column.labels = c("Fracking",
                    "Parental leave"),
  model.numbers = FALSE,
  se = list(
    starprep(lm.acquiescence.enviro, clusters = dt$rid[dt$policy == "enviro"])[[1]],
    starprep(lm.acquiescence.parent, clusters = dt$rid[dt$policy == "parent"])[[1]]
  ), 
  omit.stat = c("f", "ser"),
  no.space = TRUE, 
  style = "apsr",
  notes = c("Notes: Cluster-robust standard errors at the respondent level are in the parentheses.",
            "We fielded the survey on Lucid from January 19th to February 11th, 2022."))

